package ProjetCorba;

/**
 * Interface definition : GestionStation
 * 
 * @author OpenORB Compiler
 */
public abstract class GestionStationPOA extends org.omg.PortableServer.Servant
        implements GestionStationOperations, org.omg.CORBA.portable.InvokeHandler
{
    public GestionStation _this()
    {
        return GestionStationHelper.narrow(_this_object());
    }

    public GestionStation _this(org.omg.CORBA.ORB orb)
    {
        return GestionStationHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:ProjetCorba/GestionStation:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        if (opName.equals("ajouterStation")) {
                return _invoke_ajouterStation(_is, handler);
        } else if (opName.equals("getGestionTarif")) {
                return _invoke_getGestionTarif(_is, handler);
        } else if (opName.equals("getStation")) {
                return _invoke_getStation(_is, handler);
        } else {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke_ajouterStation(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        ProjetCorba.Station arg0_in = ProjetCorba.StationHelper.read(_is);

        ajouterStation(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getStation(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        ProjetCorba.Station _arg_result = getStation(arg0_in);

        _output = handler.createReply();
        ProjetCorba.StationHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getGestionTarif(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        ProjetCorba.GestionTarif _arg_result = getGestionTarif();

        _output = handler.createReply();
        ProjetCorba.GestionTarifHelper.write(_output,_arg_result);

        return _output;
    }

}
